#include "PokemonGame.h"
#include "SDLEngine.h"

void CreateDatabase()
{
	//CreateDatabase();
	//stringstream ss;
	//ss << "SELECT f1x, f1y FROM SpriteCoords WHERE id_pkmn = '" << atoi(bulbasaur->GetTab()->Get("id").c_str()) << "';";
	//Database* db;
	//db = new Database("Pokemon.sqlite");
	//vector<string> data = db->GetLine(ss.str());
	//int x = atoi(data.at(0).c_str());
	//int y = atoi(data.at(1).c_str());

	// *** POKEMON TABLES CREATION SCRIPT *** //
	Database *db;
	db = new Database("Pokemon.sqlite");

	// *** TABLES *** //
	if(db->Execute("Create Table Pokemon (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, no NONE NOT NULL, name NONE NOT NULL, type1 NONE NOT NULL, type2 NONE NOT NULL, base_hp NONE NOT NULL, base_atk NONE NOT NULL, base_def NONE NOT NULL, base_speed NONE NOT NULL, evolution NONE NOT NULL);"))
		cout << "Table Pokemon Created" << endl;
	else
		cout << "Table Pokemon NOT Created" << endl;

	if(db->Execute("CREATE TABLE Type (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name NONE NOT NULL);"))
		cout << "Table Type Created" << endl;
	else
		cout << "Table Type NOT Created" << endl;

if(db->Execute("CREATE TABLE Party (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, ordre NONE NOT NULL, id_pkmn NONE NOT NULL, lvl NONE NOT NULL, hp NONE NOT NULL, id_status NONE NOT NULL, id_atk1 NONE NOT NULL, id_atk2 NONE NOT NULL, id_atk3 NONE NOT NULL, id_atk4 NONE NOT NULL);"))
		cout << "Table Party Created" << endl;
	else
		cout << "Table Party NOT Created" << endl;

if(db->Execute("CREATE TABLE TypeMultiplier (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, id_type_attacker NONE NOT NULL, id_type_target NONE NOT NULL, multiplier NONE NOT NULL);"))
		cout << "Table TypeMultiplier Created" << endl;
	else
		cout << "Table TypeMultiplier NOT Created" << endl;

if(db->Execute("CREATE TABLE SpriteCoords (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, id_pkmn NONE NOT NULL, f1x NONE NOT NULL, f1y NONE NOT NULL, f2x NONE NOT NULL, f2y NONE NOT NULL, bx NONE NOT NULL, by NONE NOT NULL);"))
		cout << "Table SpriteCoords Created" << endl;
	else
		cout << "Table SpriteCoords NOT Created" << endl;

	// *** DATA *** //
	if(db->Execute("INSERT INTO Type VALUES(1, 'NONE'),(2, 'GRASS'),(3, 'POISON'),(4, 'FIRE'),(5, 'FLYING'),(6, 'BUG'),(7, 'NORMAL'),(8, 'GROUND'),(9, 'WATER'),(10, 'FIGHTING'),(11, 'ROCK'),(12, 'PSYCHIC'),(13, 'ELECTRIC'),(14, 'STEEL'),(15, 'ICE'),(16, 'GHOST'),(17, 'DRAGON');"))
		cout << "Inserts to Type Suceeded" << endl;
	else
		cout << "Inserts to Type failed" << endl;

	if(db->Execute("INSERT INTO Pokemon VALUES(1,  001, 'Bulbasaur', 2, 3, 45, 49, 49, 45, 16 ),(2,  002, 'Ivysaur', 2, 3, 60, 62, 63, 60, 32 ),(3,  003, 'Venusaur', 2, 3, 80, 82, 83, 80, 0 ),(4,  004, 'Charmander', 4, 1, 39, 52, 43, 65, 16 ),(5,  005, 'Charmeleon', 4, 1, 58, 64, 58, 80, 36 ),(6,  006, 'Charizard', 4, 5, 78, 84, 78, 100, 0 ),(7,  007, 'Squirtle', 9, 1, 44, 48, 65, 43, 16 ),(8,  008, 'Wartortle', 9, 1, 59, 63, 80, 58, 36 ),(9,  009, 'Blastoise', 9, 1, 79, 83, 100, 78, 0 ),(10,  010, 'Caterpie', 6, 1, 45, 30, 35, 45, 7 ),(11,  011, 'Metapod', 6, 1, 50, 20, 55, 30, 10 ),(12,  012, 'Butterfree', 6, 5, 60, 45, 50, 70, 0),(13,  013, 'Weedle', 6, 3, 40, 35, 30, 50, 7 ),(14,  014, 'Kakuna', 6, 3, 45, 25, 50, 35, 10 ),(15,  015, 'Beedrill', 6, 3, 65, 80, 40, 75, 0 ),(16,  016, 'Pidgey', 7, 5, 40, 45, 40, 56, 18 ),(17,  017, 'Pidgeotto', 7, 5, 63, 60, 55, 71, 36 ),(18,  018, 'Pidgeot', 7, 5, 83, 80, 75, 91, 0 ),(19,  019, 'Rattata', 7, 1, 30, 56, 35, 72, 16 ),(20,  020, 'Raticate', 7, 1, 55, 81, 60, 97, 0 ),(21,  021, 'Spearow', 7, 5, 40, 60, 30, 70, 20 ),(22,  022, 'Fearow', 7, 5, 65, 90, 65, 100, 0 ),(23,  023, 'Ekans', 3, 1, 35, 60, 44, 55, 22 ),(24,  024, 'Arbok', 3, 1, 60, 85, 69, 80, 0 ),(25,  025, 'Pikachu', 13, 1, 35, 55, 30, 90, 0 ),(26,  026, 'Raichu', 13, 1, 60, 90, 55, 100, 0 ),(27,  027, 'Sandshrew', 8, 1, 50, 75, 85, 40, 22 ),(28,  028, 'Sandslash', 8, 1, 75, 100, 110, 65, 0 ),(29,  029, 'Nidoran (Female)', 3, 1, 55, 47, 52, 41, 16 ),(30,  030, 'Nidorina', 3, 1, 70, 62, 67, 56, 0 ),(31,  031, 'Nidoqueen', 3, 8, 90, 82, 87, 76, 0 ),(32,  032, 'Nidoran (Male)', 3, 1, 46, 57, 40, 50, 16 ),(33,  033, 'Nidorino', 3, 1, 61, 72, 57, 65, 0 ),(34,  034, 'Nidoking', 3, 8, 81, 92, 77, 85, 0 ),(35,  035, 'Clefairy', 7, 1, 70, 45, 48, 35, 0 ),(36,  036, 'Clefable', 7, 1, 95, 70, 73, 60, 0 ),(37,  037, 'Vulpix', 4, 1, 38, 41, 40, 65, 0 ),(38,  038, 'Ninetales', 4, 1, 73, 76, 75, 100, 0 ),(39,  039, 'Jigglypuff', 7, 1, 115, 45, 20, 20, 0 ),(40,  040, 'Wigglytuff', 7, 1, 140, 70, 45, 45, 0 ),(41,  041, 'Zubat', 3, 5, 40, 45, 35, 55, 22 ),(42,  042, 'Golbat', 3, 5, 75, 80, 70, 90, 0 ),(43,  043, 'Oddish', 2, 3, 45, 50, 55, 30, 21 ),(44,  044, 'Gloom', 2, 3, 60, 65, 70, 40, 0 ),(45,  045, 'Vileplume', 2, 3, 75, 80, 85, 50, 0 ),(46,  046, 'Paras', 6, 2, 35, 70, 55, 25, 24 ),(47,  047, 'Parasect', 6, 2, 60, 95, 80, 30, 0 ),(48,  048, 'Venonat', 6, 3, 60, 55, 50, 45, 31 ),(49,  049, 'Venomoth', 6, 3, 70, 65, 60, 90, 0 ),(50,  050, 'Diglett', 8, 1, 10, 55, 25, 95, 26 ),(51,  051, 'Dugtrio', 8, 1, 35, 80, 50, 120, 0 ),(52,  052, 'Meowth', 7, 1, 40, 45, 35, 90, 28 ),(53,  053, 'Persian', 7, 1, 65, 70, 60, 115, 0 ),(54,  054, 'Psyduck', 9, 1, 50, 52, 48, 55, 33 ),(55,  055, 'Golduck', 9, 1, 80, 82, 78, 85, 0 ),(56,  056, 'Mankey', 10, 1, 40, 80, 35, 70, 28 ),(57,  057, 'Primeape', 10, 1, 65, 105, 60, 95, 0 ),(58,  058, 'Growlithe', 4, 1, 55, 70, 45, 60, 0 ),(59,  059, 'Arcanine', 4, 1, 90, 110, 80, 95, 0 ),(60,  060, 'Poliwag', 9, 1, 40, 50, 40, 90, 25 ),(61,  061, 'Poliwhirl', 9, 1, 65, 65, 65, 90, 0 ),(62,  062, 'Poliwrath', 9, 10, 90, 85, 95, 70, 0 ),(63,  063, 'Abra', 12, 1, 25, 20, 15, 90, 16 ),(64,  064, 'Kadabra', 12, 1, 40, 35, 30, 105, 0 ),(65,  065, 'Alakazam', 12, 1, 55, 50, 45, 120, 0 ),(66,  066, 'Machop', 10, 1, 70, 80, 50, 35, 28 ),(67,  067, 'Machoke', 10, 1, 80, 100, 70, 45, 0 ),(68,  068, 'Machamp', 10, 1, 90, 130, 80, 55, 0 ),(69,  069, 'Bellsprout', 2, 3, 50, 75, 35, 40, 21 ),(70,  070, 'Weepinbell', 2, 3, 65, 90, 50, 55, 0 ),(71,  071, 'Victreebel', 2, 3, 80, 105, 65, 70, 0 ),(72,  072, 'Tentacool', 9, 3, 40, 40, 35, 70, 30 ),(73,  073, 'Tentacruel', 9, 3, 80, 70, 65, 100, 0 ),(74,  074, 'Geodude', 11, 8, 40, 80, 100, 20, 25 ),(75,  075, 'Graveler', 11, 8, 55, 95, 115, 35, 0 ),(76,  076, 'Golem', 11, 8, 80, 110, 130, 45, 0 ),(77,  077, 'Ponyta', 4, 1, 50, 85, 55, 90, 40 ),(78,  078, 'Rapidash', 4, 1, 65, 100, 70, 105, 0 ),(79,  079, 'Slowpoke', 9, 12, 90, 65, 65, 15, 37 ),(80,  080, 'Slowbro', 9, 12, 95, 75, 110, 30, 0 ),(81,  081, 'Magnemite', 13, 14, 25, 35, 70, 45, 30 ),(82,  082, 'Magneton', 13, 14, 50, 60, 95, 70, 0 ),(83,  083, 'Farfetchd', 7, 5, 52, 65, 55, 60, 0 ),(84,  084, 'Doduo', 7, 5, 35, 85, 45, 75, 31 ),(85,  085, 'Dodrio', 7, 5, 60, 110, 70, 100, 0 ),(86,  086, 'Seel', 9, 1, 65, 45, 55, 45, 34 ),(87,  087, 'Dewgong', 9, 15, 90, 70, 80, 70, 0 ),(88,  088, 'Grimer', 3, 1, 80, 80, 50, 25, 38 ),(89,  089, 'Muk', 3, 1, 105, 105, 75, 50, 0 ),(90,  090, 'Shellder', 9, 1, 30, 65, 100, 40, 0 ),(91,  091, 'Cloyster', 9, 15, 50, 95, 180, 70, 0 ),(92,  092, 'Gastly', 16, 3, 30, 35, 30, 80, 25 ),(93,  093, 'Haunter', 16, 3, 45, 50, 45, 95, 0 ),(94,  094, 'Gengar', 16, 3, 60, 65, 60, 110, 0 ),(95,  095, 'Onix', 11, 8, 35, 45, 160, 70, 0 ),(96,  096, 'Drowzee', 12, 1, 60, 48, 45, 42, 26 ),(97,  097, 'Hypno', 12, 1, 85, 73, 70, 67, 0 ),(98,  098, 'Krabby', 9, 1, 30, 105, 90, 50, 28 ),(99,  099, 'Kingler', 9, 1, 55, 130, 115, 75, 0 ),(100,  100, 'Voltorb', 13, 1, 40, 30, 50, 100, 30 ),(101,  101, 'Electrode', 13, 1, 60, 50, 70, 140, 0 ),(102,  102, 'Exeggcute', 2, 12, 60, 40, 80, 40, 0 ),(103,  103, 'Exeggutor', 2, 12, 95, 95, 85, 55, 0 ),(104,  104, 'Cubone', 8, 1, 50, 50, 95, 35, 28 ),(105,  105, 'Marowak', 8, 1, 60, 80, 110, 45, 0 ),(106,  106, 'Hitmonlee', 10, 1, 50, 120, 53, 87, 0 ),(107,  107, 'Hitmonchan', 10, 1, 50, 105, 79, 76, 0 ),(108,  108, 'Lickitung', 7, 1, 90, 55, 75, 30, 0 ),(109,  109, 'Koffing', 3, 1, 40, 65, 95, 35, 35 ),(110,  110, 'Weezing', 3, 1, 65, 90, 120, 60, 0 ),(111,  111, 'Rhyhorn', 8, 11, 80, 85, 95, 25, 42 ),(112,  112, 'Rhydon', 8, 11, 105, 130, 120, 40, 0 ),(113,  113, 'Chansey', 7, 1, 250, 5, 5, 50, 0 ),(114,  114, 'Tangela', 2, 1, 65, 55, 115, 60, 0 ),(115,  115, 'Kangaskhan', 7, 1, 105, 95, 80, 90, 0 ),(116,  116, 'Horsea', 9, 1, 30, 40, 70, 60, 32 ),(117,  117, 'Seadra', 9, 1, 55, 65, 95, 85, 0 ),(118,  118, 'Goldeen', 9, 1, 45, 67, 60, 63, 33 ),(119,  119, 'Seaking', 9, 1, 80, 92, 65, 68, 0 ),(120,  120, 'Staryu', 9, 1, 30, 45, 55, 85, 0 ),(121,  121, 'Starmie', 9, 12, 60, 75, 85, 115, 0 ),(122,  122, 'Mr. Mime', 12, 1, 40, 45, 65, 90, 0 ),(123,  123, 'Scyther', 6, 5, 70, 110, 80, 105, 0 ),(124,  124, 'Jynx', 15, 12, 65, 50, 35, 95, 0 ),(125,  125, 'Electabuzz', 13, 1, 65, 83, 57, 105, 0 ),(126,  126, 'Magmar', 4, 1, 65, 95, 57, 93, 0 ),(127,  127, 'Pinsir', 6, 1, 65, 125, 100, 85, 0 ),(128,  128, 'Tauros', 7, 1, 75, 100, 95, 110, 0 ),(129,  129, 'Magikarp', 9, 1, 20, 10, 55, 80, 20 ),(130,  130, 'Gyarados', 9, 5, 95, 125, 79, 81, 0 ),(131,  131, 'Lapras', 9, 15, 130, 85, 80, 60, 0 ),(132,  132, 'Ditto', 7, 1, 48, 48, 48, 48, 0 ),(133,  133, 'Eevee', 7, 1, 55, 55, 50, 55, 0 ),(134,  134, 'Vaporeon', 9, 1, 130, 65, 60, 65, 0 ),(135,  135, 'Jolteon', 13, 1, 65, 65, 60, 130, 0 ),(136,  136, 'Flareon', 4, 1, 65, 130, 60, 65, 0 ),(137,  137, 'Porygon', 7, 1, 65, 60, 70, 40, 0 ),(138,  138, 'Omanyte', 11, 9, 35, 40, 100, 35, 40 ),(139,  139, 'Omastar', 11, 9, 70, 60, 125, 55, 0 ),(140,  140, 'Kabuto', 11, 9, 30, 80, 90, 55, 40 ),(141,  141, 'Kabutops', 11, 9, 60, 115, 105, 80, 0 ),(142,  142, 'Aerodactyl', 11, 5, 80, 105, 65, 130, 0 ),(143,  143, 'Snorlax', 7, 1, 160, 110, 65, 30, 0 ),(144,  144, 'Articuno', 15, 5, 90, 85, 100, 85, 0 ),(145,  145, 'Zapdos', 13, 5, 90, 90, 85, 100, 0 ),(146,  146, 'Moltres', 4, 5, 90, 100, 90, 90, 0 ),(147,  147, 'Dratini', 17, 1, 41, 64, 45, 50, 30 ),(148,  148, 'Dragonair', 17, 1, 61, 84, 65, 70, 55 ),(149,  149, 'Dragonite', 17, 5, 91, 134, 95, 80, 0 ),(150,  150, 'Mewtwo', 12, 1, 106, 110, 90, 130, 0 ),(151,  150, 'Mewtwo', 12, 1, 106, 110, 90, 130, 0 );"))
		cout << "Inserts to Pokemon Suceeded" << endl;
	else
		cout << "Inserts to Pokemon failed" << endl;

	if(db->Execute("INSERT INTO Party VALUES(NULL, '1', '114', '17', '45', '1', '5', '7', '1', '0'), (NULL, '1', '114', '43', '27', '1', '5', '7', '1', '0'), (NULL, '1', '114', '20', '12', '1', '5', '7', '1', '0'), (NULL, '1', '150', '100', '350', '1', '5', '2', '1', '0');"))
		cout << "Inserts to Pokemon to party Suceeded" << endl;
	else
		cout << "Inserts to Pokemon to party failed" << endl;

	if(db->Execute("INSERT INTO TypeMultiplier VALUES(NULL, '2', '2', '0.5'), (NULL, '2', '3', '0.5'), (NULL, '2', '4', '0.5'), (NULL, '2', '5', '0.5'), (NULL, '2', '6', '0.5'), (NULL, '2', '7', '1'), (NULL, '2', '8', '2'), (NULL, '2', '9', '2'), (NULL, '2', '10', '1'), (NULL, '2', '11', '2'), (NULL, '2', '12', '1'), (NULL, '2', '13', '1'), (NULL, '2', '14', '0.5'), (NULL, '2', '15', '1'), (NULL, '2', '16', '1'), (NULL, '2', '17', '0.5'), (NULL, '2', '18', '1 '), (NULL, '3', '2', '2'), (NULL, '3', '3', '0.5'), (NULL, '3', '4', '1'), (NULL, '3', '5', '1'), (NULL, '3', '6', '1'), (NULL, '3', '7', '1'), (NULL, '3', '8', '0.5'), (NULL, '3', '9', '1'), (NULL, '3', '10', '1'), (NULL, '3', '11', '0.5'), (NULL, '3', '12', '1'), (NULL, '3', '13', '1'), (NULL, '3', '14', '0'), (NULL, '3', '15', '1'), (NULL, '3', '16', '0.5'), (NULL, '3', '17', '1'), (NULL, '3', '18', '1 '), (NULL, '4', '2', '2'), (NULL, '4', '3', '1'), (NULL, '4', '4', '0.5'), (NULL, '4', '5', '1'), (NULL, '4', '6', '2'), (NULL, '4', '7', '1'), (NULL, '4', '8', '1'), (NULL, '4', '9', '0.5'), (NULL, '4', '10', '1'), (NULL, '4', '11', '0.5'), (NULL, '4', '12', '1'), (NULL, '4', '13', '1'), (NULL, '4', '14', '2'), (NULL, '4', '15', '2'), (NULL, '4', '16', '1'), (NULL, '4', '17', '0.5'), (NULL, '4', '18', '1 '), (NULL, '5', '2', '2'), (NULL, '5', '3', '1'), (NULL, '5', '4', '1'), (NULL, '5', '5', '1'), (NULL, '5', '6', '2'), (NULL, '5', '7', '1'), (NULL, '5', '8', '1'), (NULL, '5', '9', '1'), (NULL, '5', '10', '2'), (NULL, '5', '11', '0.5'), (NULL, '5', '12', '1'), (NULL, '5', '13', '0.5'), (NULL, '5', '14', '0.5'), (NULL, '5', '15', '1'), (NULL, '5', '16', '1'), (NULL, '5', '17', '1'), (NULL, '5', '18', '1 '), (NULL, '6', '2', '2'), (NULL, '6', '3', '0.5'), (NULL, '6', '4', '0.5'), (NULL, '6', '5', '0.5'), (NULL, '6', '6', '1'), (NULL, '6', '7', '1'), (NULL, '6', '8', '1'), (NULL, '6', '9', '1'), (NULL, '6', '10', '0.5'), (NULL, '6', '11', '1'), (NULL, '6', '12', '2'), (NULL, '6', '13', '1'), (NULL, '6', '14', '0.5'), (NULL, '6', '15', '1'), (NULL, '6', '16', '0.5'), (NULL, '6', '17', '1'), (NULL, '6', '18', '2 '), (NULL, '7', '2', '1'), (NULL, '7', '3', '1'), (NULL, '7', '4', '1'), (NULL, '7', '5', '1'), (NULL, '7', '6', '1'), (NULL, '7', '7', '1'), (NULL, '7', '8', '1'), (NULL, '7', '9', '1'), (NULL, '7', '10', '1'), (NULL, '7', '11', '0.5'), (NULL, '7', '12', '1'), (NULL, '7', '13', '1'), (NULL, '7', '14', '0.5'), (NULL, '7', '15', '1'), (NULL, '7', '16', '0'), (NULL, '7', '17', '1'), (NULL, '7', '18', '1 '), (NULL, '8', '2', '0.5'), (NULL, '8', '3', '2'), (NULL, '8', '4', '2'), (NULL, '8', '5', '0'), (NULL, '8', '6', '0.5'), (NULL, '8', '7', '1'), (NULL, '8', '8', '1'), (NULL, '8', '9', '1'), (NULL, '8', '10', '1'), (NULL, '8', '11', '2'), (NULL, '8', '12', '1'), (NULL, '8', '13', '2'), (NULL, '8', '14', '2'), (NULL, '8', '15', '1'), (NULL, '8', '16', '1'), (NULL, '8', '17', '1'), (NULL, '8', '18', '1 '), (NULL, '9', '2', '0.5'), (NULL, '9', '3', '1'), (NULL, '9', '4', '2'), (NULL, '9', '5', '1'), (NULL, '9', '6', '1'), (NULL, '9', '7', '1'), (NULL, '9', '8', '2'), (NULL, '9', '9', '0.5'), (NULL, '9', '10', '1'), (NULL, '9', '11', '2'), (NULL, '9', '12', '1'), (NULL, '9', '13', '1'), (NULL, '9', '14', '1'), (NULL, '9', '15', '1'), (NULL, '9', '16', '1'), (NULL, '9', '17', '0.5'), (NULL, '9', '18', '1 '), (NULL, '10', '2', '1'), (NULL, '10', '3', '0.5'), (NULL, '10', '4', '1'), (NULL, '10', '5', '0.5'), (NULL, '10', '6', '0.5'), (NULL, '10', '7', '2'), (NULL, '10', '8', '1'), (NULL, '10', '9', '1'), (NULL, '10', '10', '1'), (NULL, '10', '11', '2'), (NULL, '10', '12', '0.5'), (NULL, '10', '13', '1'), (NULL, '10', '14', '2'), (NULL, '10', '15', '2'), (NULL, '10', '16', '0'), (NULL, '10', '17', '1'), (NULL, '10', '18', '2 '), (NULL, '11', '2', '1'), (NULL, '11', '3', '1'), (NULL, '11', '4', '2'), (NULL, '11', '5', '2'), (NULL, '11', '6', '2'), (NULL, '11', '7', '1'), (NULL, '11', '8', '0.5'), (NULL, '11', '9', '1'), (NULL, '11', '10', '0.5'), (NULL, '11', '11', '1'), (NULL, '11', '12', '1'), (NULL, '11', '13', '1'), (NULL, '11', '14', '0.5'), (NULL, '11', '15', '2'), (NULL, '11', '16', '1'), (NULL, '11', '17', '1'), (NULL, '11', '18', '1 '), (NULL, '12', '2', '1'), (NULL, '12', '3', '2'), (NULL, '12', '4', '1'), (NULL, '12', '5', '1'), (NULL, '12', '6', '1'), (NULL, '12', '7', '1'), (NULL, '12', '8', '1'), (NULL, '12', '9', '1'), (NULL, '12', '10', '2'), (NULL, '12', '11', '1'), (NULL, '12', '12', '0.5'), (NULL, '12', '13', '1'), (NULL, '12', '14', '0.5'), (NULL, '12', '15', '1'), (NULL, '12', '16', '1'), (NULL, '12', '17', '1'), (NULL, '12', '18', '0 '), (NULL, '13', '2', '0.5'), (NULL, '13', '3', '1'), (NULL, '13', '4', '1'), (NULL, '13', '5', '2'), (NULL, '13', '6', '1'), (NULL, '13', '7', '1'), (NULL, '13', '8', '0'), (NULL, '13', '9', '2'), (NULL, '13', '10', '1'), (NULL, '13', '11', '1'), (NULL, '13', '12', '1'), (NULL, '13', '13', '0.5'), (NULL, '13', '14', '1'), (NULL, '13', '15', '1'), (NULL, '13', '16', '1'), (NULL, '13', '17', '0.5'), (NULL, '13', '18', '1 '), (NULL, '14', '2', '1'), (NULL, '14', '3', '1'), (NULL, '14', '4', '0.5'), (NULL, '14', '5', '1'), (NULL, '14', '6', '1'), (NULL, '14', '7', '1'), (NULL, '14', '8', '1'), (NULL, '14', '9', '0.5'), (NULL, '14', '10', '1'), (NULL, '14', '11', '2'), (NULL, '14', '12', '1'), (NULL, '14', '13', '0.5'), (NULL, '14', '14', '0.5'), (NULL, '14', '15', '2'), (NULL, '14', '16', '1'), (NULL, '14', '17', '1'), (NULL, '14', '18', '1 '), (NULL, '15', '2', '2'), (NULL, '15', '3', '1'), (NULL, '15', '4', '0.5'), (NULL, '15', '5', '2'), (NULL, '15', '6', '1'), (NULL, '15', '7', '1'), (NULL, '15', '8', '2'), (NULL, '15', '9', '0.5'), (NULL, '15', '10', '1'), (NULL, '15', '11', '1'), (NULL, '15', '12', '1'), (NULL, '15', '13', '1'), (NULL, '15', '14', '0.5'), (NULL, '15', '15', '0.5'), (NULL, '15', '16', '1'), (NULL, '15', '17', '2'), (NULL, '15', '18', '1 '), (NULL, '16', '2', '1'), (NULL, '16', '3', '1'), (NULL, '16', '4', '1'), (NULL, '16', '5', '1'), (NULL, '16', '6', '1'), (NULL, '16', '7', '0'), (NULL, '16', '8', '1'), (NULL, '16', '9', '1'), (NULL, '16', '10', '1'), (NULL, '16', '11', '1'), (NULL, '16', '12', '2'), (NULL, '16', '13', '1'), (NULL, '16', '14', '0.5'), (NULL, '16', '15', '1'), (NULL, '16', '16', '2'), (NULL, '16', '17', '1'), (NULL, '16', '18', '0.5 '), (NULL, '17', '2', '1'), (NULL, '17', '3', '1'), (NULL, '17', '4', '1'), (NULL, '17', '5', '1'), (NULL, '17', '6', '1'), (NULL, '17', '7', '1'), (NULL, '17', '8', '1'), (NULL, '17', '9', '1'), (NULL, '17', '10', '1'), (NULL, '17', '11', '1'), (NULL, '17', '12', '1'), (NULL, '17', '13', '1'), (NULL, '17', '14', '0.5'), (NULL, '17', '15', '1'), (NULL, '17', '16', '1'), (NULL, '17', '17', '2'), (NULL, '17', '18', '1 '), (NULL, '18', '2', '1'), (NULL, '18', '3', '1'), (NULL, '18', '4', '1'), (NULL, '18', '5', '1'), (NULL, '18', '6', '1'), (NULL, '18', '7', '1'), (NULL, '18', '8', '1'), (NULL, '18', '9', '1'), (NULL, '18', '10', '0.5'), (NULL, '18', '11', '1'), (NULL, '18', '12', '2'), (NULL, '18', '13', '1'), (NULL, '18', '14', '0.5'), (NULL, '18', '15', '1'), (NULL, '18', '16', '2'), (NULL, '18', '17', '1'), (NULL, '18', '18', '0.5 ');"))
		cout << "Inserts to TypeMultiplier Suceeded" << endl;
	else
		cout << "Inserts to TypeMultiplier failed" << endl;

	if(db->Execute("INSERT INTO SpriteCoords VALUES(NULL, '1', '0', '0', '90', '0', '180', '0 '), (NULL, '2', '0', '80', '90', '80', '180', '80 '), (NULL, '3', '0', '160', '90', '160', '180', '160 '), (NULL, '4', '0', '240', '90', '240', '180', '240 '), (NULL, '5', '0', '320', '90', '320', '180', '320 '), (NULL, '6', '0', '400', '90', '400', '180', '400 '), (NULL, '7', '0', '480', '90', '480', '180', '480 '), (NULL, '8', '0', '580', '90', '560', '180', '560 '), (NULL, '9', '0', '640', '90', '640', '180', '640 '), (NULL, '10', '0', '720', '90', '720', '180', '720 '), (NULL, '11', '0', '800', '90', '800', '180', '800 '), (NULL, '12', '0', '880', '90', '880', '180', '880 '), (NULL, '13', '0', '960', '90', '960', '180', '960 '), (NULL, '14', '0', '1040', '90', '1040', '180', '1040 '), (NULL, '15', '0', '1120', '90', '1120', '180', '1120 '), (NULL, '16', '0', '1200', '90', '1200', '180', '1200 '), (NULL, '17', '0', '1280', '90', '1280', '180', '1280 '), (NULL, '18', '0', '1360', '90', '1360', '180', '1360 '), (NULL, '19', '0', '1440', '90', '1440', '180', '1440 '), (NULL, '20', '0', '1520', '90', '1520', '180', '1520 '), (NULL, '21', '0', '1600', '90', '1600', '180', '1600 '), (NULL, '22', '0', '1680', '90', '1680', '180', '1680 '), (NULL, '23', '0', '1760', '90', '1760', '180', '1760 '), (NULL, '24', '0', '1840', '90', '1840', '180', '1840 '), (NULL, '25', '0', '1920', '90', '1920', '180', '1920 '), (NULL, '26', '0', '2000', '90', '2000', '180', '2000 '), (NULL, '27', '0', '2080', '90', '2080', '180', '2080 '), (NULL, '28', '0', '2160', '90', '2160', '180', '2160 '), (NULL, '29', '0', '2240', '90', '2240', '180', '2240 '), (NULL, '30', '0', '2320', '90', '2320', '180', '2320 '), (NULL, '31', '0', '2400', '90', '2400', '180', '2400 '), (NULL, '32', '0', '2480', '90', '2480', '180', '2480 '), (NULL, '33', '0', '2560', '90', '2560', '180', '2560 '), (NULL, '34', '0', '2640', '90', '2640', '180', '2640 '), (NULL, '35', '0', '2720', '90', '2720', '180', '2720 '), (NULL, '36', '0', '2800', '90', '2800', '180', '2800 '), (NULL, '37', '0', '2880', '90', '2880', '180', '2880 '), (NULL, '38', '0', '2960', '90', '2960', '180', '2960 '), (NULL, '39', '0', '3040', '90', '3040', '180', '3040 '), (NULL, '40', '0', '3120', '90', '3120', '180', '3120 '), (NULL, '41', '0', '3200', '90', '3200', '180', '3200 '), (NULL, '42', '0', '3280', '90', '3280', '180', '3280 '), (NULL, '43', '0', '3360', '90', '3360', '180', '3360 '), (NULL, '44', '0', '3440', '90', '3440', '180', '3440 '), (NULL, '45', '0', '3520', '90', '3520', '180', '3520 '), (NULL, '46', '0', '3600', '90', '3600', '180', '3600 '), (NULL, '47', '0', '3680', '90', '3680', '180', '3680 '), (NULL, '48', '0', '3760', '90', '3760', '180', '3760 '), (NULL, '49', '0', '3840', '90', '3840', '180', '3840 '), (NULL, '50', '0', '3920', '90', '3920', '180', '3920 '), (NULL, '51', '0', '4000', '90', '4000', '180', '4000 '), (NULL, '52', '0', '4080', '90', '4080', '180', '4080 '), (NULL, '53', '0', '4160', '90', '4160', '180', '4160 '), (NULL, '54', '0', '4240', '90', '4240', '180', '4240 '), (NULL, '55', '0', '4320', '90', '4320', '180', '4320 '), (NULL, '56', '0', '4400', '90', '4400', '180', '4400 '), (NULL, '57', '0', '4480', '90', '4480', '180', '4480 '), (NULL, '58', '0', '4560', '90', '4560', '180', '4560 '), (NULL, '59', '0', '4640', '90', '4640', '180', '4640 '), (NULL, '60', '0', '4720', '90', '4720', '180', '4720 '), (NULL, '61', '0', '4800', '90', '4800', '180', '4800 '), (NULL, '62', '0', '4880', '90', '4880', '180', '4880 '), (NULL, '63', '0', '4960', '90', '4960', '180', '4960 '), (NULL, '64', '0', '5040', '90', '5040', '180', '5040 '), (NULL, '65', '0', '5120', '90', '5120', '180', '5120 '), (NULL, '66', '0', '5200', '90', '5200', '180', '5200 '), (NULL, '67', '0', '5280', '90', '5280', '180', '5280 '), (NULL, '68', '0', '5360', '90', '5360', '180', '5360 '), (NULL, '69', '0', '5440', '90', '5440', '180', '5440 '), (NULL, '70', '0', '5520', '90', '5520', '180', '5520 '), (NULL, '71', '0', '5600', '90', '5600', '180', '5600 '), (NULL, '72', '0', '5680', '90', '5680', '180', '5680 '), (NULL, '73', '0', '5760', '90', '5760', '180', '5760 '), (NULL, '74', '0', '5840', '90', '5840', '180', '5840 '), (NULL, '75', '0', '5920', '90', '5920', '180', '5920 '), (NULL, '76', '0', '6000', '90', '6000', '180', '6000 '), (NULL, '77', '0', '6080', '90', '6080', '180', '6080 '), (NULL, '78', '0', '6160', '90', '6160', '180', '6160 '), (NULL, '79', '0', '6240', '90', '6240', '180', '6240 '), (NULL, '80', '0', '6320', '90', '6320', '180', '6320 '), (NULL, '81', '0', '6400', '90', '6400', '180', '6400 '), (NULL, '82', '0', '6480', '90', '6480', '180', '6480 '), (NULL, '83', '0', '6560', '90', '6560', '180', '6560 '), (NULL, '84', '0', '6640', '90', '6640', '180', '6640 '), (NULL, '85', '0', '6720', '90', '6720', '180', '6720 '), (NULL, '86', '0', '6800', '90', '6800', '180', '6800 '), (NULL, '87', '0', '6880', '90', '6880', '180', '6880 '), (NULL, '88', '0', '6960', '90', '6960', '180', '6960 '), (NULL, '89', '0', '7040', '90', '7040', '180', '7040 '), (NULL, '90', '0', '7120', '90', '7120', '180', '7120 '), (NULL, '91', '0', '7200', '90', '7200', '180', '7200 '), (NULL, '92', '0', '7280', '90', '7280', '180', '7280 '), (NULL, '93', '0', '7360', '90', '7360', '180', '7360 '), (NULL, '94', '0', '7440', '90', '7440', '180', '7440 '), (NULL, '95', '0', '7520', '90', '7520', '180', '7520 '), (NULL, '96', '0', '7600', '90', '7600', '180', '7600 '), (NULL, '97', '0', '7680', '90', '7680', '180', '7680 '), (NULL, '98', '0', '7760', '90', '7760', '180', '7760 '), (NULL, '99', '0', '7840', '90', '7840', '180', '7840 '), (NULL, '100', '0', '7920', '90', '7920', '180', '7920 '), (NULL, '101', '0', '8000', '90', '8000', '180', '8000 '), (NULL, '102', '0', '8080', '90', '8080', '180', '8080 '), (NULL, '103', '0', '8160', '90', '8160', '180', '8160 '), (NULL, '104', '0', '8240', '90', '8240', '180', '8240 '), (NULL, '105', '0', '8320', '90', '8320', '180', '8320 '), (NULL, '106', '0', '8400', '90', '8400', '180', '8400 '), (NULL, '107', '0', '8480', '90', '8480', '180', '8480 '), (NULL, '108', '0', '8560', '90', '8560', '180', '8560 '), (NULL, '109', '0', '8640', '90', '8640', '180', '8640 '), (NULL, '110', '0', '8720', '90', '8720', '180', '8720 '), (NULL, '111', '0', '8800', '90', '8800', '180', '8800 '), (NULL, '112', '0', '8880', '90', '8880', '180', '8880 '), (NULL, '113', '0', '8960', '90', '8960', '180', '8960 '), (NULL, '114', '0', '9040', '90', '9040', '180', '9040 '), (NULL, '115', '0', '9120', '90', '9120', '180', '9120 '), (NULL, '116', '0', '9200', '90', '9200', '180', '9200 '), (NULL, '117', '0', '9280', '90', '9280', '180', '9280 '), (NULL, '118', '0', '9360', '90', '9360', '180', '9360 '), (NULL, '119', '0', '9440', '90', '9440', '180', '9440 '), (NULL, '120', '0', '9520', '90', '9520', '180', '9520 '), (NULL, '121', '0', '9600', '90', '9600', '180', '9600 '), (NULL, '122', '0', '9680', '90', '9680', '180', '9680 '), (NULL, '123', '0', '9760', '90', '9760', '180', '9760 '), (NULL, '124', '0', '9840', '90', '9840', '180', '9840 '), (NULL, '125', '0', '9920', '90', '9920', '180', '9920 '), (NULL, '126', '0', '10000', '90', '10000', '180', '10000 '), (NULL, '127', '0', '10080', '90', '10080', '180', '10080 '), (NULL, '128', '0', '10160', '90', '10160', '180', '10160 '), (NULL, '129', '0', '10240', '90', '10240', '180', '10240 '), (NULL, '130', '0', '10320', '90', '10320', '180', '10320 '), (NULL, '131', '0', '10400', '90', '10400', '180', '10400 '), (NULL, '132', '0', '10480', '90', '10480', '180', '10480 '), (NULL, '133', '0', '10560', '90', '10560', '180', '10560 '), (NULL, '134', '0', '10640', '90', '10640', '180', '10640 '), (NULL, '135', '0', '10720', '90', '10720', '180', '10720 '), (NULL, '136', '0', '10800', '90', '10800', '180', '10800 '), (NULL, '137', '0', '10880', '90', '10880', '180', '10880 '), (NULL, '138', '0', '10960', '90', '10960', '180', '10960 '), (NULL, '139', '0', '11040', '90', '11040', '180', '11040 '), (NULL, '140', '0', '11120', '90', '11120', '180', '11120 '), (NULL, '141', '0', '11200', '90', '11200', '180', '11200 '), (NULL, '142', '0', '11280', '90', '11280', '180', '11280 '), (NULL, '143', '0', '11360', '90', '11360', '180', '11360 '), (NULL, '144', '0', '11440', '90', '11440', '180', '11440 '), (NULL, '145', '0', '11520', '90', '11520', '180', '11520 '), (NULL, '146', '0', '11600', '90', '11600', '180', '11600 '), (NULL, '147', '0', '11680', '90', '11680', '180', '11680 '), (NULL, '148', '0', '11760', '90', '11760', '180', '11760 '), (NULL, '149', '0', '11840', '90', '11840', '180', '11840 '), (NULL, '150', '0', '11920', '90', '11920', '180', '11920 '), (NULL, '151', '0', '12000', '90', '12000', '180', '12000 ');"))
		cout << "Inserts to SpriteCoords Suceeded" << endl;
	else
		cout << "Inserts to SpriteCoords failed" << endl;
}

int main(int argc, char* args[])
{
	// Create une database ( Pokemon.sqlite )
	// CreateDatabase();

	SDLEngine::GetInstance()->Init();
	SDLRenderer::GetInstance()->SetResolution(320,240,32);
	SDLRenderer::GetInstance()->StartRendering();

	PokemonGame* game = new PokemonGame();

	SDLEngine::GetInstance()->Start();

	return 0;
}

